const orderDao = require('../dao/orderDao');
module.exports.find = async function(searchObj,page){
    try{
        return await orderDao.find(searchObj,page);
    }catch(e){
        
        return {};
    }
}
module.exports.findAll = async function(year){
    try{
        return await orderDao.findAll(year);
    }catch(e){
        
        return {};
    }
}
module.exports.findById = async function(id){
    try{
        return await orderDao.findById(id);
    }catch(e){
        return {};
    }
}
module.exports.insert = async function(orders){
   
    try{
        return await orderDao.insert(orders);
    }catch(e){
        return {}
    }
}
module.exports.update = async function(id,orders){
    try{
        return await orderDao.update(id,orders);
    }catch(e){
        return {}
    }
}
module.exports.delete = async function(id){
    try{
        return await orderDao.delete(id);
    }catch(e){
        return {}
    }
}